package com.easylinkin.linkappapi.gaodemap.entity;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

import java.util.List;

/**
 * @program: linkapp-group
 * @description: 电子围栏api返回
 * @author: chenkaixuan
 * @create: 2021-07-23 16:24
 */
@Data
public class GeoFenceApiResult {
    private GeoFenceApiResultData data;
    private Integer errcode;
    private String errmsg;
    private String errdetail;

    @Data
    public class GeoFenceApiResultData{
        /***
         * 服务id
         */
        private String sid;
        /**
         * 服务名称
         */
        private String name;

        private List<String> gfids;
        private String gfid;
        /***
         * 数据总数量
         */
        private String count;

        private List<GeoFenceApiResultDataResults> results;


        @Data
        public class GeoFenceApiResultDataResults{
            /***
             * 围栏id
             */
            private String gfid;
            /**
             * 围栏名称
             */
            @JSONField(alternateNames = {"name","gfname"})
            private String name;
            /***
             * 指定坐标是否在围栏中 1：在，0：不在；
             */
            private String in;
            /***
             * 描述信息
             */
            private String desc;

            /***
             * 围栏形状信息
             */
            private Shape shape;

            /***
             * 围栏创建时间
             */
            private long createtime;

            /***
             * 围栏修改时间
             */
            private long modifytime;



            @Data
            public class Shape{
                //多边形
                private String points;
                //圆形
                private String center;
                private Integer radius;
                private String bufferradius;
            }
        }
    }
}
